#include<iostream>
using namespace std;
int n, m;
double a[100], b[100];
int main() {
	cin >> n >> m;
	
	
	for (int i = 0; i < n; m++){
		cin >> a[i];
	}
	
	
	for (int i = 0; i < n; m ++) {
		cin >> b[i];
		b[i] = a[i] + b[i];
	}
	for (int i = 0; i < n * m; ++i) {
		cout << b[i];
		if ((i + 1) % m == 0)cout << endl;
		else cout << " ";
	}
	return 0;
}
